//
//  KFDTeachingViewController.m
//  KFD
//
//  Created by JIRENTIANXIANG on 7/14/15.
//  Copyright © 2015 kfd. All rights reserved.
//

#import "KFDTeachingViewController.h"
#import "KFDUIConfigurator.h"

@interface KFDTeachingViewController ()

@property (strong,nonatomic) UIWebView* webView;

@end

@implementation KFDTeachingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    KFDUIConfigurator* uiConfigurator=[KFDUIConfigurator configuratorForViewController:self];
    [uiConfigurator configureNavigationBarWithBackAction:@selector(goBack)];
    self.title=[NSString stringWithFormat:@"正在与%@聊天中",self.teacher.realname];
    self.webView=[[UIWebView alloc] initWithFrame:self.view.frame];
    [self.view addSubview:self.webView];
    NSURLRequest* request=[NSURLRequest requestWithURL:[NSURL URLWithString:self.teacher.url]];
    [self.webView loadRequest:request];
}

-(void)goBack
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
